/*
 * Copyright 2025 The JA-SIG Collaborative. All rights reserved.
 * distributed with this file and available online at
 */
package com.lap.auth.application.menu.command;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

@Data
@Schema(description = "更新菜单访问日志命令")
public class UpdateMenuViewLogCmd {

  @NotNull(message = "{menuViewLog.userId.required}")
  @Range(min = 0, max = 2147483647, message = "{menuViewLog.userId.range}")
  @Schema(description = "管理员ID")
  private Integer userId;

  @NotBlank(message = "{menuViewLog.userName.required}")
  @Length(max = 32, message = "{menuViewLog.userName.max.length}")
  @Schema(description = "登录账号")
  private String userName;

  @Length(max = 16, message = "{menuViewLog.fullName.max.length}")
  @Schema(description = "姓名")
  private String fullName;

  @Length(max = 256, message = "{menuViewLog.accessUri.max.length}")
  @Schema(description = "访问地址")
  private String accessUri;

  @Length(max = 16, message = "{menuViewLog.accessMethod.max.length}")
  @Schema(description = "访问方法")
  private String accessMethod;

  @Length(max = 256, message = "{menuViewLog.accessIp.max.length}")
  @Schema(description = "访问来源ip")
  private String accessIp;

  @Length(max = 128, message = "{menuViewLog.accessAddress.max.length}")
  @Schema(description = "访问来源地点")
  private String accessAddress;

  @Length(max = 2048, message = "{menuViewLog.accessParam.max.length}")
  @Schema(description = "访问入参")
  private String accessParam;

  @Length(max = 65535, message = "{menuViewLog.accessResult.max.length}")
  @Schema(description = "访问返回值")
  private String accessResult;

  @Length(max = 256, message = "{menuViewLog.browser.max.length}")
  @Schema(description = "访问浏览器")
  private String browser;

  @Length(max = 256, message = "{menuViewLog.operatingSystem.max.length}")
  @Schema(description = "访问系统")
  private String operatingSystem;

  @Range(min = 0, max = 2147483647, message = "{menuViewLog.times.range}")
  @Schema(description = "访问耗时")
  private Long times;
}
